<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery简单的选择器</title>
	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript">
	$(document).ready(function(){
		$("#button1").click(function(){
			$("div:eq(1)").css("color","#FF0033")
		});
		$("#button2").click(function(){
			$(".txt span:even").css("color","#EE5533")
		});
		$("#button3").click(function(){
			$(".txt span:odd").css("color","#66ff33")
		});
		$("#button4").click(function(){
			$("span:first").css("color","#3300ff")
		});
		$("#button5").click(function(){
			$("span:gt(0)").css("color","#990099")
		});
		$("#button6").click(function(){
			$("div:not(:last)").css("color","#ff0099")
		});
	});
	  </script>
</head>
<body>
<h1>jQuery简单的选择器</h1>

<div>javascript森林群规有<span class="num">120</span>个会员,其中管理员<span class="num">120</span>个；</div>

<div>javascript森林群博客目前有<span>30</span>作者,<span>10</span>篇文章；</div>

<p>我是愚人码头</p>

<div class="txt">
	<span>你叫什么名字呢？</span>
	<span>我爱javascript森林；</span>
	<span>以为森林里有我好好多的朋友；</span>
	<span>欢迎你加入我们；</span>
<div>

<div>
  <input type="submit" name="button" id="button1" value="测试$('div:eq(1)')" />
  <input type="submit" name="button" id="button2" value="测试$('.txt span:even')" />
  <input type="submit" name="button" id="button3" value="测试$('.txt span:odd')" />
  <input type="submit" name="button" id="button4" value="测试$('span:first')" />
  <input type="submit" name="button" id="button5" value="测试$('span:gt(0)')" />
  <input type="submit" name="button" id="button6" value="测试$('div:not(:last)')" />
</div>

</div></div></body>

</html>
